body.caerp {
	.ui-widget {
		font-family: 'OpenSans', sans-serif;
	}

	.ui-widget-content {
		color: var(--text-color);
	}

	.ui-datepicker {
		&.ui-widget.ui-widget-content {
			background: var(--screen-background-color);
			border: 0 none;
			border-radius: 0;
			box-shadow: 0 0 4px var(--box-shadow-color);
			display: none;
			padding: 0;
			z-index: $abovePopinLayer !important;
		}

		.ui-datepicker-header {
			align-items: center;
			background: var(--theme-color);
			border-radius: 0;
			color: var(--theme-text-color);
			display: flex;
			justify-content: space-between;
			padding: 0;

			a span {
				visibility: hidden;
			}

			a {
				background: var(--form-select-arrow) no-repeat 50% 50%;
				background-size: auto 1rem;
				cursor: pointer;
				filter: invert(100%);
				height: 2em;
				opacity: .8;
				position: static;
				width: 2em;

				&:hover,
				&:focus,
				&:active {
					background-image: var(--form-select-arrow-hover);
					filter: none;
					opacity: 1;
				}
			}

			a.ui-datepicker-prev {
				transform: rotate(90deg);
				margin-top: 7px;
				order: 0;
			}

			a.ui-datepicker-next {
				transform: rotate(-90deg);
				margin-top: -7px;
				order: 2;
			}

			.ui-datepicker-title {
				flex: 1 0 auto;
				font-size: 1rem;
				font-weight: bold;
				line-height: 2em;
				margin: 0;
				order: 1;
				text-align: center;
			}
		}

		.ui-datepicker-calendar {
			padding: 2px;

			tbody tr:hover td {
				box-shadow: none !important;
			}
		}

		th {
			color: var(--text-color);
		}

		tr td {
			box-shadow: none;
			padding: 0;

			a {
				border-radius: 0;
				box-shadow: none;
				display: block;
				line-height: 1.5;
				min-width: 2.25em;
				padding: var(--padding-s);
				text-align: center;
				text-decoration: none;
			}

			.ui-state-hover {
				background: var(--form-icon-button-hover-color);
				box-shadow: 0 2px 4px var(--box-shadow-color);
				color: var(--static-color);
			}

			&.ui-datepicker-today {
				font-weight: bold;
			}
		}

		.ui-timepicker-div {
			padding: 0 var(--padding-s);

			dl {
				display: flex;
				flex-wrap: wrap;
			}

			dt,
			dd {
				line-height: 1.5em;
				margin: 0 0 var(--padding-s);
			}

			dt {
				height: auto;
				width: 5.5em;
			}

			dd {
				width: calc(100% - 6em);
			}

			dt[style*="display"]+dd {
				display: none;
			}

			.ui-slider-horizontal {
				border: 1px solid var(--border-trans-color);
				box-shadow: inset 0 0 2px var(--form-focus-line2-color);
				border-radius: 0;
				margin: 5px 0 -5px;
			}

			.ui-slider-handle {
				background: var(--form-main-button-background-color);
				border: 1px solid  var(--form-main-button-background-color);
				border-radius: 0;

				&:hover,
				&:focus,
				&:active {
					box-shadow: 0 2px 4px var(--box-shadow-color);
				}
			}
		}

		.ui-datepicker-buttonpane.ui-widget-content {
			border-top: 1px dotted var(--func-disabled-color);

			button.ui-state-default {
				background: var(--form-input-background-color);
				border: 1px solid  var(--form-main-button-background-color);
				color: var(--form-button-text-color);
				font-weight: bold;
				opacity: 1;
			}

			button.ui-priority-primary {
				background: var(--form-main-button-background-color);
				color: var(--form-button-main-text-color);
			}
		}
	}

	.ui-widget-overlay {
		align-items: center;
		background: var(--mask-layer-background-color);
		bottom: 0;
		display: block;
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
		z-index: $maskLayer;
	}

	.ui-dialog {
		background: var(--form-input-background-color);
		box-shadow: 0 2px 4px var(--box-shadow-color);
		position: relative;
		z-index: $aboveMaskLayer;

		.ui-dialog-titlebar {
			background: var(--theme-color);
			color: var(--theme-text-color);
			padding: 10px;
		}

		.ui-dialog-title {
			color: var(--theme-text-color);
			font-family: "Raleway", sans-serif;
			font-size: 1.25rem;
			font-weight: bold;
		}

		.ui-dialog-titlebar-close {
			background: url("../icons/times.svg") no-repeat 50% 50%;
			background-size: auto 1rem;
			border: 0 none;
			cursor: pointer;
			height: 2.25rem;
			position: absolute;
			right: 0;
			top: 0;
			width: 2.25rem;

			&:hover,
			&:focus,
			&:active {
				background-image: url("../icons/times-active.svg");
			}
		}

		.ui-dialog-content {
			padding: 10px 10px 0;
		}
	}

	.ui-datepicker-div {
		z-index: $aboveMaskLayer;
	}
}

body.caerp.theme_manage_entity {
	.ui-datepicker {
		.ui-datepicker-header {

			a:hover,
			a:focus,
			a:active {
				background-image: var(--form-select-arrow);
			}
		}
	}
}